package f;

import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;

/* compiled from: CipherSuite */
public final class f {
    public static final Comparator<String> b = new a();
    public static final Map<String, f> c;
    public static final f d;
    public static final f e;
    public static final f f;
    public static final f g;
    public static final f h;
    public static final f i;
    public static final f j;
    public static final f k;
    public static final f l;
    public static final f m;
    public static final f n;
    public static final f o;
    public static final f p;
    public static final f q;
    public static final f r;
    public static final f s;
    public static final f t;
    public static final f u;
    public final String a;

    /* compiled from: CipherSuite */
    public class a implements Comparator<String> {
        public int compare(Object obj, Object obj2) {
            String str = (String) obj;
            String str2 = (String) obj2;
            int min = Math.min(str.length(), str2.length());
            for (int i = 4; i < min; i++) {
                char charAt = str.charAt(i);
                char charAt2 = str2.charAt(i);
                if (charAt != charAt2) {
                    if (charAt < charAt2) {
                        return -1;
                    }
                    return 1;
                }
            }
            int length = str.length();
            int length2 = str2.length();
            if (length == length2) {
                return 0;
            }
            if (length < length2) {
                return -1;
            }
            return 1;
        }
    }

    static {
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        c = linkedHashMap;
        String str = "SSL_RSA_WITH_NULL_MD5";
        linkedHashMap.put(str, new f(str));
        String str2 = "SSL_RSA_WITH_NULL_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_RSA_EXPORT_WITH_RC4_40_MD5";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_RSA_WITH_RC4_128_MD5";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_RSA_WITH_RC4_128_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_RSA_WITH_DES_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_RSA_WITH_3DES_EDE_CBC_SHA";
        f fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        d = fVar;
        str2 = "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_DHE_DSS_WITH_DES_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_DHE_RSA_WITH_DES_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_DH_anon_WITH_RC4_128_MD5";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_DH_anon_WITH_DES_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_KRB5_WITH_DES_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_KRB5_WITH_3DES_EDE_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_KRB5_WITH_RC4_128_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_KRB5_WITH_DES_CBC_MD5";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_KRB5_WITH_3DES_EDE_CBC_MD5";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_KRB5_WITH_RC4_128_MD5";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_KRB5_EXPORT_WITH_RC4_40_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_KRB5_EXPORT_WITH_RC4_40_MD5";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_RSA_WITH_AES_128_CBC_SHA";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        e = fVar;
        str2 = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DH_anon_WITH_AES_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_RSA_WITH_AES_256_CBC_SHA";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        f = fVar;
        str2 = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DH_anon_WITH_AES_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_RSA_WITH_NULL_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_RSA_WITH_AES_128_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_RSA_WITH_AES_256_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DH_anon_WITH_AES_128_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DH_anon_WITH_AES_256_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_PSK_WITH_RC4_128_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_PSK_WITH_3DES_EDE_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_PSK_WITH_AES_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_PSK_WITH_AES_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_RSA_WITH_SEED_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_RSA_WITH_AES_128_GCM_SHA256";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        g = fVar;
        str2 = "TLS_RSA_WITH_AES_256_GCM_SHA384";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        h = fVar;
        str2 = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DH_anon_WITH_AES_128_GCM_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_DH_anon_WITH_AES_256_GCM_SHA384";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_EMPTY_RENEGOTIATION_INFO_SCSV";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_FALLBACK_SCSV";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_ECDSA_WITH_NULL_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_ECDSA_WITH_RC4_128_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_ECDSA_WITH_NULL_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_RSA_WITH_NULL_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_RSA_WITH_RC4_128_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_RSA_WITH_NULL_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_RSA_WITH_RC4_128_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        i = fVar;
        str2 = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        j = fVar;
        str2 = "TLS_ECDH_anon_WITH_NULL_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_anon_WITH_RC4_128_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_anon_WITH_AES_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_anon_WITH_AES_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        k = fVar;
        str2 = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        l = fVar;
        str2 = "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        m = fVar;
        str2 = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        n = fVar;
        str2 = "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        o = fVar;
        str2 = "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        p = fVar;
        str2 = "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256";
        linkedHashMap.put(str2, new f(str2));
        str2 = "TLS_AES_128_GCM_SHA256";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        q = fVar;
        str2 = "TLS_AES_256_GCM_SHA384";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        r = fVar;
        str2 = "TLS_CHACHA20_POLY1305_SHA256";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        s = fVar;
        str2 = "TLS_AES_128_CCM_SHA256";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        t = fVar;
        str2 = "TLS_AES_256_CCM_8_SHA256";
        fVar = new f(str2);
        linkedHashMap.put(str2, fVar);
        u = fVar;
    }

    public f(String str) {
        Objects.requireNonNull(str);
        this.a = str;
    }

    public static synchronized f a(String str) {
        f fVar;
        synchronized (f.class) {
            Map map = c;
            fVar = (f) map.get(str);
            if (fVar == null) {
                fVar = (f) map.get(b(str));
                if (fVar == null) {
                    fVar = new f(str);
                }
                map.put(str, fVar);
            }
        }
        return fVar;
    }

    public static String b(String str) {
        String str2 = "TLS_";
        String str3 = "SSL_";
        StringBuilder g;
        if (str.startsWith(str2)) {
            g = c.b.a.a.a.g(str3);
            g.append(str.substring(4));
            return g.toString();
        }
        if (str.startsWith(str3)) {
            g = c.b.a.a.a.g(str2);
            g.append(str.substring(4));
            str = g.toString();
        }
        return str;
    }

    public String toString() {
        return this.a;
    }
}
